package com.xnyzc.lhy.didi.feign.fallback.mq;

import com.xnyzc.lhy.common.entity.Rv;
import com.xnyzc.lhy.didi.entity.order.InitiatePaymentParam;
import com.xnyzc.lhy.didi.entity.order.OaCOrderPersonal;
import com.xnyzc.lhy.didi.entity.param.order.OrderArrivalsParam;
import com.xnyzc.lhy.didi.feign.mq.IMqService;
import com.xnyzc.lhy.order.entity.order.OaDOrder;
import com.xnyzc.lhy.order.entity.order.OaOrderOtherPrice;
import lombok.extern.slf4j.Slf4j;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * 回调函数
 *
 * @author zhengxu
 */
@Slf4j
@Service
public class MqServiceFallbackImpl implements IMqService {
//    @Override
//    public Rv getMqDriver(OrderParam orderParam) {
//        log.info("跨服务调用消息队列失败");
//        return Rv.wrap(EDiDiErrorCode.screeningDriversFeignFail);
//    }
//
//    /**
//     * 司机抢单结果保护机制
//     *
//     * @param orderDetailParam 订单详情
//     */
//    @Override
//    public void getDidiSheet(OrderDetailParam orderDetailParam) {
//        log.error("司机抢单结果保护机制失效");
//    }
//
//    @Override
//    public void getDispatchLog(OaSysDispatchLog orderDetailParam) {
//        log.error("订单调度日志添加失败!");
//    }
//
//    /**
//     * 创建订单
//     *
//     * @param createOrderParam 创建订单参数
//     */
//    @Override
//    public void createDidiOrder(CreateOrderParam createOrderParam) {
//        log.error("创建订单失败，降级服务触发");
//    }
//
    @Override
    public Boolean addDriverOrderInfo(OaDOrder oaDOrder) {
        log.info("添加司机详情失败");
        return false;
    }

    @Override
    public Boolean updateUserOrderInfo(OaCOrderPersonal oaCOrderPersonal) {
        log.info("更改用户订单信息失败!");
        return false;
    }

//    @Override
//    public void updateOrderPersonalStatus(OrderDetailParam orderDetailParam) {
//        log.info("修改订单失败");
//    }
//
    @Override
    public Boolean singleFailureStatus(String orderNo) {
        log.info("抢单失败，跨服务调用修改状态失败");
        return false;
    }

    @Override
    public Boolean driverUnlock(String driverId) {
        log.info("取消司机锁定失败");
        return false;
    }

    @Override
    public String getDriverPhone(String driverId) {
        log.info("feign获取司机手机号失败");
        return null;
    }

    @Override
    public OaCOrderPersonal billDetails(String orderNo) {
        log.info("账单获取失败");
        return null;
    }

    @Override
    public Integer orderPersonalStatus(String orderNo) {
        log.info("查询订单状态失败");
        return null;
    }

    @Override
    public List<OaOrderOtherPrice> queryOrderOtherPrice(String orderNo) {
        log.info("查询订单其他费用失败");
        return null;
    }

    @Override
    public boolean updateOrderOtherPrice(List<OaOrderOtherPrice> otherPrices) {
        log.info("更改订单其他费用失败");
        return false;
    }

    @Override
    public Rv initiatePayment(InitiatePaymentParam paymentParam) {
        log.error("feign调用发起收款失败！！我是回调方法！");
        return null;
    }

    @Override
    public Rv endTakingPassengers(OrderArrivalsParam order) {
        log.info("客服关单调用到达目的地失败");
        return null;
    }

//    @Override
//    public void generateOrderList(OrderParam orderParam) {
//        log.info("查找:{}订单信息列表失败", orderParam);
//    }
}
